Skip to content

[various] Convert example boilerplate from Java to Kotlin#12201

Merged
auto-submit[bot] merged 6 commits into
flutter:mainfrom
stuartmorgan-g:kotlin-example-boilerplate
Jul 20, 2026
Merged

[various] Convert example boilerplate from Java to Kotlin#12201
auto-submit[bot] merged 6 commits into
flutter:mainfrom
stuartmorgan-g:kotlin-example-boilerplate

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Converts various example files that are entirely or almost entirely boilerplate from Java to Kotlin. These are manual conversions following very simple mechanical conversion rules, and mostly replicated across a bunch of copies.

Since these are not files that anyone needs to interact with regularly, this seemed in keeping with the current policy of allowing Java for files that are not actively maintained by humans (mostly generated Pigeon code, but also most example app code, and some small utilities for Java/Kotlin Pigeon interop), while also letting us more easily see what code is actually still using Java.

Part of flutter/flutter#188630

Pre-Review Checklist

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@github-actions github-actions Bot removed the CICD Run CI/CD label Jul 15, 2026
@stuartmorgan-g
stuartmorgan-g marked this pull request as ready for review July 15, 2026 14:03
@stuartmorgan-g stuartmorgan-g added the triage-android Should be looked at in Android triage label Jul 15, 2026
@stuartmorgan-g
stuartmorgan-g requested a review from reidbaker July 15, 2026 14:03

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates various Android example files, including activities and test annotations, from Java to Kotlin across multiple packages, and updates compile options to Java 17 in path_provider_android. The review feedback suggests removing unnecessary empty curly braces from Kotlin classes that do not have a body to improve readability and align with the Kotlin style guide.

@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label Jul 15, 2026
// found in the LICENSE file.

package io.flutter.plugins.videoplayerexample;
package dev.flutter.packages.file_selector_android_example

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this package change from videoplayer to file_selector that seems odd? Is this just a goofy diff?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, goofy diff. https://github.com/flutter/packages/pull/12201/changes/BASE..7e1682bedb666ae8062250ab7cf4439d0a2b32b4#diff-184008b21da0737a5394630bb058154b375dabd33dc6d857b61c316ad1e222e1 is the reverse. Why the move detection only picked out these two files, and also thinks they swapped places, I have absolutely no idea.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 20, 2026
@auto-submit
auto-submit Bot merged commit 97438f1 into flutter:main Jul 20, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants